﻿// KeySend.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include <Windows.h>
#include "../ShenTuApp/CReadMemLib.h"
int main()
{
	//GetWindowThreadProcessId(hWnd, &_pid);

    HWND hwnd = ::FindWindowA("GAME","神途-05号苍穹单职1区-1刀99999999");
	if (hwnd)
	{
		do
		{
			//::SendMessage(hwnd,WM_KEYDOWN, VK_F7, 0);
			Sleep(20);
			//::SendMessage(hwnd,WM_KEYUP,VK_F7,0);
			Sleep(100);
			::SendMessage(hwnd, WM_KEYDOWN, 50, 0);
			Sleep(20);
			::SendMessage(hwnd, WM_KEYUP, 50, 0);
			Sleep(1000);
		} while (true);
	}
    std::cout << "Hello World!\n";
}
